home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / f2c / may_5_92.lha / f2c.VMay_5_1992 / libI77 / README < prev    next >
Text File  |  1992-05-07  |  5KB  |  112 lines

  1. If your system lacks /usr/include/local.h ,
  2. then you should create an appropriate local.h in
  3. this directory.  An appropriate local.h may simply
  4. be empty, or it may #define VAX or #define CRAY
  5. (or whatever else you must do to make fp.h work right).
  6. Alternatively, edit fp.h to suite your machine.
  7.  
  8. If your system lacks /usr/include/fcntl.h , then you
  9. should simply create an empty fcntl.h in this directory.
  10.  
  11. If your system's sprintf does not work the way ANSI C
  12. specifies -- specifically, if it does not return the
  13. number of characters transmitted -- then insert the line
  14.  
  15. #define USE_STRLEN
  16.  
  17. at the end of fmt.h .  This is necessary with
  18. at least some versions of Sun software.
  19.  
  20. If your system's fopen does not like the ANSI binary
  21. reading and writing modes "rb" and "wb", then you should
  22. compile open.c with NON_ANSI_RW_MODES #defined.
  23.  
  24. If you get error messages about references to cf->_ptr
  25. and cf->_base when compiling wrtfmt.c and wsfe.c or to
  26. stderr->_flag when compiling err.c, then insert the line
  27.  
  28. #define NON_UNIX_STDIO
  29.  
  30. at the beginning of fio.h, and recompile these modules.
  31.  
  32. Unformatted sequential records consist of a length of record
  33. contents, the record contents themselves, and the length of
  34. record contents again (for backspace).  Prior to 17 Oct. 1991,
  35. the length was of type int; now it is of type long, but you
  36. can change it back to int by inserting
  37.  
  38. #define UIOLEN_int
  39.  
  40. at the beginning of fio.h.  This affects only sue.c and uio.c .
  41.  
  42. You may need to supply the following non-ANSI routines:
  43.  
  44.   fstat(int fileds, struct stat *buf) is similar
  45. to stat(char *name, struct stat *buf), except that
  46. the first argument, fileds, is the file descriptor
  47. returned by open rather than the name of the file.
  48. fstat is used in the system-dependent routine
  49. canseek (in the libI77 source file err.c), which
  50. is supposed to return 1 if it's possible to issue
  51. seeks on the file in question, 0 if it's not; you may
  52. need to suitably modify err.c .  On non-UNIX systems,
  53. you can avoid references to fstat and stat by compiling
  54. err.c, inquire.c, open.c, and util.c with MSDOS defined;
  55. in that case, you may need to supply access(char *Name,0),
  56. which is supposed to return 0 if file Name exists,
  57. nonzero otherwise.
  58.  
  59.   char * mktemp(char *buf) is supposed to replace the
  60. 6 trailing X's in buf with a unique number and then
  61. return buf.  The idea is to get a unique name for
  62. a temporary file.
  63.  
  64. On non-UNIX systems, you may need to change a few other,
  65. e.g.: the form of name computed by mktemp() in endfile.c and
  66. open.c; the use of the open(), close(), and creat() system
  67. calls in endfile.c, err.c, open.c; and the modes in calls on
  68. fopen() and fdopen() (and perhaps the use of fdopen() itself
  69. -- it's supposed to return a FILE* corresponding to a given
  70. an integer file descriptor) in err.c and open.c (component ufmt
  71. of struct unit is 1 for formatted I/O -- text mode on some systems
  72. -- and 0 for unformatted I/O -- binary mode on some systems).
  73.  
  74. For Turbo C++, in particular, you need to adjust the mktemp
  75. invocations and should compile all of libI77 with -DMSDOS .
  76. You also need to #undef ungetc in lread.c and rsne.c .
  77. Don't use -mh -- it is horribly broken.
  78.  
  79. If you want to be able to load against libI77 but not libF77,
  80. then you will need to add sig_die.o (from libF77) to libI77.
  81.  
  82. If you wish to use translated Fortran that has funny notions
  83. of record length for direct unformatted I/O (i.e., that assumes
  84. RECL= values in OPEN statements are not bytes but rather counts
  85. of some other units -- e.g., 4-character words for VMS), then you
  86. should insert an appropriate #define for url_Adjust at the
  87. beginning of open.c .  For VMS Fortran, for example,
  88. #define url_Adjust(x) x *= 4
  89. would suffice.
  90.  
  91. To check for transmission errors, issue the command
  92.     make check
  93. This assumes you have the xsum program whose source, xsum.c,
  94. is distributed as part of "all from f2c/src".  If you do not
  95. have xsum, you can obtain xsum.c by sending the following E-mail
  96. message to netlib@research.att.com
  97.     send xsum.c from f2c/src
  98.  
  99. The makefile assumes you have installed f2c.h in a standard
  100. place (and does not cause recompilation when f2c.h is changed);
  101. f2c.h comes with "all from f2c" (the source for f2c) and is
  102. available separately ("f2c.h from f2c").
  103.  
  104. By default, Fortran I/O units 5, 6, and 0 are pre-connected to
  105. stdin, stdout, and stderr, respectively.  You can change this
  106. behavior by changing f_init() in err.c to suit your needs.
  107. Note that f2c assumes READ(*... means READ(5... and WRITE(*...
  108. means WRITE(6... .  Moreover, an OPEN(n,... statement that does
  109. not specify a file name (and does not specify STATUS='SCRATCH')
  110. assumes FILE='fort.n' .  You can change this by editing open.c
  111. and endfile.c suitably.
  112.